package prueba;

import java.net.URL;
import java.awt.Desktop;
import java.io.File;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;

import static java.lang.System.err;

public final class TestBrowserLaunch
    {

    public static void main( String[] args ) throws URISyntaxException
        {
        if ( Desktop.isDesktopSupported() )
            {
            final Desktop dt = Desktop.getDesktop();
            if ( dt.isSupported( Desktop.Action.BROWSE ) )
                {
                try
                    {
//                    dt.browse( new URI( "http://www.google.com" ) );
                    URI mandar = new URI("mailto","unomateu@hotmail.com?SUBJECT=Happy New Year!&cc=a@a.de&bcc=a@a.de&BODY=Happy New Year, Duke!\nnuevo",null);
                    dt.mail(mandar);
                        System.out.println("esta es otra parte de la version");
                    
                    }
//                catch ( URISyntaxException e )
//                    {
//                    err.println( e.getMessage() );
//                    }
                catch ( IOException e )
                    {
                    err.println( e.getMessage() );
                    }
                }
            }
        }
    }